<!DOCTYPE HTML>
<html lang="zh">
<meta charset="utf-8">
<head>
    <link href="/aityWeb/static/css/font-awesome.css" rel="stylesheet"/>

    <style type="text/css">
        .nav > li:hover .dropdown-menu {display: block;}
    </style>

    <link href="/aityWeb/static/css/bootstrap.min.css" rel="stylesheet"/>
    <link href="/aityWeb/static/css/font-awesome.css" rel="stylesheet"/>
    <!-- bootstrap-table 表格插件样式 -->
    <link href="/aityWeb/static/ajax/libs/bootstrap-table/bootstrap-table.min.css" rel="stylesheet"/>
    <link href="/aityWeb/static/ajax/libs/bootstrap-treetable/bootstrap-treetable.css" rel="stylesheet"/>
    <link href="/aityWeb/static/css/animate.css" rel="stylesheet"/>
    <link href="/aityWeb/static/css/style.css" rel="stylesheet"/>
    <link href="/aityWeb/static/css/checkbox.css" rel="stylesheet"/>
    <link href="/aityWeb/static/ajax/libs/select/select2.css" rel="stylesheet"/>
    <link href="/aityWeb/static/galaxy/css/ry-ui.css" rel="stylesheet"/>


</head>
<body class="gray-bg">
<div class="container-div">
    <div class="row">
        <div class="col-sm-12 select-info" style="padding-top: 10px;">
            <ul class="breadcrumb" style="font-size: 16px;background-color: #f3f3f3;padding: 5px 10px;color: #337ab7;">
                <li><i class="fa fa-home" aria-hidden="true"></i>&nbsp;&nbsp;<a href="#">首页</a></li>
                <li class="active"><a href="#">车辆管理</a></li>
                <li class="active"><a href="#">记录管理</a></li>
            </ul>
            
            <ul id="myTab" class="nav nav-tabs" >
	              <li class="active">
		             <a href="#home" data-toggle="tab">
			                                            图形
		             </a>
	             </li>
	             <li ><a href="#ios" data-toggle="tab">表格</a></li>
	             
            </ul>
            
            <div id="myTabContent" class="tab-content">
	              <div class="tab-pane fade in active" id="home">
		              <div id="jiluchart" class="col-sm-12 " style="width: 1000px;height:400px;  margin-top: 20px;"></div>
	              </div>
	              <div class="tab-pane fade" id="ios">
	                   <div class="col-sm-12 " style="padding-top: 10px;height: 100%">
                <form id="menu-form">
                    <div class="select-list">
                        <ul>
                            <li>
								<input type="text" style="padding-left: 10px;" name="devName" placeholder="请输入车牌号" />
							</li>
							<li>
								<span class="btn btn-primary btn-rounded btn-sm" onclick="search()"><i class="fa fa-search"></i>&nbsp;搜索</span>
							</li>
                          
                        </ul>
                    </div>
                </form>
            </div>
            <div class="btn-group hidden-xs" id="toolbar" role="group">

                <button type="button" class="btn btn-primary">
                    <span class="glyphicon glyphicon-plus"></span>
                    导出记录表
                </button>
               

            </div>
            <table id="bootstrap-table" data-mobile-responsive="true"></table>
		
	              </div>
	
            </div>
            
            
            
            
        </div>
    </div>
</div>

<script src="/aityWeb/static/js/jquery.min.js"></script>
<script src="/aityWeb/static/js/bootstrap.min.js"></script>
<script src="/aityWeb/static/js/echarts.common.min.js"></script>
<!-- <script src="/aityWeb/static/js/jquery-1.12.2.js"></script> -->
<!-- bootstrap-table 表格插件 -->
<script src="/aityWeb/static/ajax/libs/bootstrap-table/bootstrap-table.min.js"></script>
<script src="/aityWeb/static/ajax/libs/bootstrap-table/locale/bootstrap-table-zh-CN.min.js"></script>
<script src="/aityWeb/static/ajax/libs/bootstrap-table/extensions/mobile/bootstrap-table-mobile.min.js"></script>
<script src="/aityWeb/static/ajax/libs/bootstrap-table/extensions/toolbar/bootstrap-table-toolbar.min.js"></script>
<!-- jquery-validate 表单验证插件 -->
<script src="/aityWeb/static/ajax/libs/validate/jquery.validate.min.js"></script>
<script src="/aityWeb/static/ajax/libs/validate/messages_zh.min.js"></script>
<script src="/aityWeb/static/ajax/libs/validate/jquery.validate.extend.js"></script>
<!-- jquery-validate 表单树插件 -->
<script src="/aityWeb/static/ajax/libs/bootstrap-treetable/bootstrap-treetable.js"></script>
<!-- jquery-export 表格导出插件 -->
<script src="/aityWeb/static/ajax/libs/bootstrap-table/extensions/export/bootstrap-table-export.js"></script>
<script src="/aityWeb/static/ajax/libs/bootstrap-table/extensions/export/tableExport.js"></script>
<!-- 遮罩层 -->
<script src="/aityWeb/static/ajax/libs/blockUI/jquery.blockUI.js"></script>
<script src="/aityWeb/static/ajax/libs/layer/layer.min.js"></script>
<script src="/aityWeb/static/ajax/libs/layui/layui.js"></script>
<script src="/aityWeb/static/galaxy/js/common.js?v=2.3.0"></script>
<script src="/aityWeb/static/galaxy/js/ry-ui.js?v=2.3.0"></script>
<script type="text/javascript">





  //调试开关
	var debug_switch = true;
    var prefix = '';
      function loadInner(url) {
        window.location.href = "add.html";
      }
   jQuery(document).ready(function() {
        dataTableInit();
        
       /* echarts */ 
        var myChart = echarts.init(document.getElementById('jiluchart'));

       // 指定图表的配置项和数据
        var option = {
        	 title: {
                    text: '每日车辆来访流量'
                },
    		 xAxis: {
    		        type: 'category',
    		        data: ['08点', '09点', '10点', '11点', '12点', '13点', '14点','15点','16点','17点','18点','19点','20点','21点']
    		    },
    		    yAxis: {
    		        type: 'value'
    		    },
    		    series: [{
    		        data: [120, 200, 150, 80, 70, 110, 130,100, 70, 50, 120, 90, 50, 20],
    		        type: 'line',
    		        symbol: 'triangle',
    		        symbolSize: 20,
    		        lineStyle: {
    		            normal: {
    		                color: 'green',
    		                width: 4,
    		                type: 'dashed'
    		            }
    		        },
    		        itemStyle: {
    		            normal: {
    		                borderWidth: 3,
    		                borderColor: 'yellow',
    		                color: 'blue'
    		            }
    		        }
    		    }]
     };

     // 使用刚指定的配置项和数据显示图表。
     myChart.setOption(option);
     /*end echarts  */   

   });
   function search(){
		 $("#bootstrap-table").bootstrapTable('refresh');
	}
   function dataTableInit() {
         $("#bootstrap-table").bootstrapTable({
            url: "/aityWeb/static/json/carManger/jilu.json",
//          createUrl: prefix + "/add",
//          updateUrl: prefix + "/edit/{id}",
//          removeUrl: prefix + "/remove",
//          search: false,
            modalName: "车辆记录管理",
 //           url: "http://test.dongqil.com/qyd_dongqil/order/selectOrdersManage",
            cache: false,
            method: 'post', 
            sortable: false, //是否启用排序
            pagination: true, //分页
            pageNumber:1,//初始化加载第一页，默认第一页
            pageSize: 10,
            pageList: [5,10, 25, 50],//可供选择的每页的行数（*）
            singleSelect: false,
//          showColumns: true,  //显示下拉框勾选要显示的列
            locale:"zh-US", //表格汉化
            search: false , //显示搜索框
            sidePagination: "server", //服务端处理分页server client
            //【查询设置】
            /* queryParamsType的默认值为 'limit' ,在默认情况下 传给服务端的参数为：offset,limit,sort
             设置为 ''  在这种情况下传给服务器的参数为：pageSize,pageNo */
            queryParamsType:'',
            queryParams: function queryParams(params) {
                     var param = {
                    data:{
                        page: params.pageNumber,
                        rows: params.pageSize,
                        selectType:"new"
                    },
                    checkcode:"",
                    type: 1//0 APP;1 后台
            };
             syslog(JSON.stringify(param));
                return param;
                
               },
               responseHandler: function(res) {
                return {
                    "total": res.total,//总页数
                    "rows": res.rows   //数据
                 };
               },
				columns: [{
					checkbox: true
				},
				{
                    field : 'id',
                    title : 'ID'
                },
                {
                    field : 'plateNum',
                    title : '车牌号'
                },              
                {
                    field : 'inTime',
                    title : '驶入时间'
                },
                {
                    field : 'outTime',
                    title : '驶出时间'
                },
                {
                    field : 'times',
                    title : '本周来访次数'
                },
                {
                    title: '操作',
                    align: 'center',
                    formatter: function(value, row, index) {
                        var actions = [];
                        actions.push('<a href="#" onclick="deletebyid('+row.id+')"><i class="fa fa-pencil"></i>删除</a>') ;
                      	

                        return actions.join('');
                    }
                }
             
               ]
        })
       }  
   
   
   function edit(id){
    	if(id){
    	
    		window.location.href = "/aityWeb/view/carManger/shouquanedit.html?action=edit&shopid="+id;

    	}else{
    		window.location.href = "/aityWeb/view/venue/shopinfo.html?action=create&shopid="+id;


    	}
    	
}
   function add(){
	   window.location.href = "/aityWeb/view/carManger/shouquanedit.html";
   }

function  deletebyid(id){
   alert(id);
}     
   
   
   
    	function syslog(strlog){
		if(debug_switch){
			console.log(strlog);
		}
	}
</script>
</body>
</html>

